package com.test.cordova.citylist.bean;

import com.github.promeg.pinyinhelper.Pinyin;

/**
 */

public class City {

    private String cityPinyin; //城市拼音
    private String cityName;
    private String firsttPinyin;  //城市首字母

    public City(String cityName) {
        this.cityName = cityName;
        this.cityPinyin = Pinyin.toPinyin(cityName,"");
        this.firsttPinyin = cityPinyin.substring(0,1);
    }

    public String getCityPinyin() {
        return cityPinyin;
    }

    public String getCityName() {
        return cityName;
    }


    public String getFirsttPinyin() {
        return firsttPinyin;
    }

    @Override
    public String toString() {
        return "City{" +
                "cityPinyin='" + cityPinyin + '\'' +
                ", cityName='" + cityName + '\'' +
                ", firsttPinyin='" + firsttPinyin + '\'' +
                '}';
    }
}
